<? foreach (dat('gallery') as $im => $info) { ?>

	<div class="thumb">
		<a title='Kill image' class="button kill" href="delete-<?=$im?>/" onclick="return confirm('Are you sure you want to kill this image?')"><span>Kill</span></a><br />
		<a href="#" title="See full picture in a window" onclick="return showImage('<?="$s[path]$im"?>', '', <?=$info['w']?>, <?=$info['h']?>);">
			<img src="<?="$s[path]$info[tn]"?>" />
		</a>
	</div>

<? } ?>

<div class="clearer"></div>


<form action="" method="post" enctype="multipart/form-data">

		<div>
			<p><label>Add image (size: <?=$s[w]?> x <?=$s[h]?>)<br />
				<input type="file" name="image" class="wide" />
			</label></p>
			<p><input type="submit" name="photo_add" value="Add" /></p>
		</div>

</form>
